<?php
function reponse($texte) 
{
  switch ($texte) 
    {
    case "Functions3D"    : return "3D Functions"; break;
    case "Hough"          : return "Hough transform"; break;
    case "Harris"         : return "Harris transform"; break;
    case "Canny"          : return "Canny/Deriche"; break;
    case "FunctionsSIMD"  : return "More SIMD functions"; break;
    case "SIMD_HMT"       : return "Hit or Miss SIMD functions"; break;
    case "Wavelets"       : return "Wavelets"; break;
    case "java"           : return "Java NMI Wrapper"; break;
    case "php"            : return "PHP Wrapper"; break;
    case "lua"            : return "Lua Wrapper"; break;
    case "Others"         : return "Others"; break;
    }
}

$serveur     = "mysql4-f";
$utilisateur = "f207174ro";
$motDePasse  = "ad2tu9rg";
$base        = "f207174_sondage";
     
mysql_pconnect($serveur, $utilisateur, $motDePasse);
mysql_select_db($base) or die("Connection error");
     
$result = mysql_query("SELECT resultat, COUNT(nom) FROM sondage GROUP BY resultat");

print '<html>';
print '<head>';
print '<title>Fulguro Poll</title>';
print '</head>';
print '<body>';

print '<center><h2>What is missing in Fulguro, in your opinion?</h2><br><br>';
print '<table border="1">';
print '<tr><td><b>Functionality</b></td><td><b>Number of votes</b></td></tr>';

while($row = mysql_fetch_array($result,MYSQL_NUM)){
  print '<tr><td>';
  print reponse($row[0]);
  print '</td><td>';
  print $row[1];
  print '</td></tr>';
}


print '</table><br><br>';
print '<hr align=\"center\" width=\"100%\" color=\"midnightblue\" size=\"3\">';
print '<a href=\"http://sourceforge.net\">';
print '<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=207174&amp;type=5"';
print 'width="210" height="62" border="0" alt="SourceForge.net Logo" /></a><br>';
print '</body>';
print '</html>';


mysql_free_result($result);
     
?>


